import { createRouter, createWebHistory } from 'vue-router'

const Home = () => import('../view/home/index.vue')
const Anchor = () => import('../view/anchor/index.vue')
const News = () => import('../view/news/index.vue')

const Login = () => import('../view/login/index.vue')
const DownloadApp = () => import('../view/login/downloadApp.vue')
const Simulator = () => import('../view/simulator/index.vue')
const SecretPrivacy = () => import('../view/secretPrivacy/index.vue')
const PersonalEula = () => import('../view/personalEula/index.vue')
const Chat = () => import('../view/chat/index.vue')
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
    },
    {
      path: '/anchor',
      name: 'anchor',
      component: Anchor,
    },
    {
      path: '/news',
      name: 'news',
      component: News,
    },
    {
      path: '/anchor',
      name: 'anchor',
      component: Anchor,
    },
    {
      path: '/login',
      name: 'login',
      component: Login,
    },
    {
      path: '/simulator',
      name: 'simulator',
      component: Simulator,
    },
    {
      path: '/secretPrivacy',
      name: 'SecretPrivacy',
      component: SecretPrivacy,
    },
    {
      path: '/personalEula',
      name: 'personalEula',
      component: PersonalEula,
    },
    {
      path: '/downloadApp',
      name: 'downloadApp',
      component: DownloadApp,
    },
    {
      path: '/chat/:bot_id',
      name: 'Chat',
      component: Chat,
    },
    {
      path: '/:catchall(.*)',
      name: 'catchAll',
      component: Home,
    },
  ],
})

export default router
